//#define __DEBUG__
#define THIS_FILE "fn_removetech.sqf"
#include "x_setup.sqf"

if (GVAR(no_tech) == 0) then {
	__TRACE_1("","_this")
	
	if !(isNil "vas_items") then {
		{ if (_x != "" && {!(_x in vas_items)}) then { __TRACE_1("Removing","_x") _this removePrimaryWeaponItem _x; };
		} foreach (primaryWeaponItems _this);
		{ if (_x != "" && {!(_x in vas_items)}) then { __TRACE_1("Removing","_x") _this removeHandgunItem _x; };
		} foreach (handgunItems _this);
		{ if (_x != "" && {((!(_x in vas_items)) && (!(_x in vas_weapons)))}) then { __TRACE_1("Removing","_x") _this unlinkItem _x; };
		} foreach (assignedItems _this);		
		{ if !(_x in vas_items) then { __TRACE_1("Removing","_x") _this removeItems _x; };
		} foreach (items _this);
	};
};